/************/
/* Includes */
/************/
#include <iostream>
using namespace std;
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
using namespace System;

using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Drawing;
public ref class Form1: public System::Windows::Forms::Form
{
private:
   
   System::Windows::Forms::ProgressBar^ pBar;
   System::Windows::Forms::HScrollBar^  sBar;
public:
   Form1()
   {

		sBar	= gcnew HScrollBar;
		pBar	= gcnew ProgressBar;

		Controls->Add(sBar);
		Controls->Add(pBar);


		sBar->Location	= Point(15,200);
		sBar->Width = 200;
		sBar->Scroll += gcnew System::Windows::Forms::ScrollEventHandler(this, &Form1::sBar_Scroll);


		pBar->Location	= Point(15,15);
		pBar->Minimum	= 1;
		pBar->Maximum	= 100;
		pBar->Width     = 200;

		this->Width = 500;

   }



   
private:
		System::Void sBar_Scroll(System::Object^  sender, System::Windows::Forms::ScrollEventArgs^  e) {
			pBar->PerformStep();
		}
			

};

int main()
{


	Application::Run( gcnew Form1 );


	return 0;
}